<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\TeamModel;
class TeamController extends Controller
{
	/**
	 * [teamAdd description]
	 * @return [type] [description]
	 */
    public function teamAdd(){

    	return view("admin/teamAdd");
    }

/**
 * [teamCreate description]
 * @return [type] [description]
 */
    public function teamCreate(){
    $data=request()->except("_token");

    $res=TeamModel::create($data);

    if($res){

    	return redirect("admin/teamIndex");
    }
    }

/**
 * [teamIndex description]
 * @return [type] [description]
 */
    public function teamIndex(){

    $data=TeamModel::get();
    
    return view("admin/teamIndex",['data'=>$data]);
    }
}
